package jhlee42;

public class J01Retangle {

	// 사각형 면적, 둘레 계산하는 프로그램
	// 입력값 : 가로,세로,색상

	public static void main(String[] args) {
		// 1. 변수 선언 및 초기화
		double width = 1.0; // 실수 double
		double height = 1.0;
		String color = "white"; // 문자열 String
		double getAtea;
		double getPerimeter;

		// 2. 계산 및 연산
		getAtea = width * height;
		getPerimeter = (width + height) * 2;

		// 3. 결과 출력

		System.out.println(width);
		System.out.println(height);
		System.out.println(color);
		System.out.println(getAtea);
		System.out.println(getPerimeter);

		// 시험값1 : 4,40,red
		width = 4;
		height = 40;
		color = "red";

		getAtea = width * height;
		getPerimeter = (width + height) * 2;

		System.out.println(width);
		System.out.println(height);
		System.out.println(color);
		System.out.println(getAtea);
		System.out.println(getPerimeter);

		// 시험값2 : 3.5 35.9 orange

		width = 3.5;
		height = 40;
		color = "orange";

		getAtea = width * height;
		getPerimeter = (width + height) * 2;

		System.out.println(width);
		System.out.println(height);
		System.out.println(color);
		System.out.println(getAtea);
		System.out.println(getPerimeter);

	}

}
